<template>
  <view class="page">
    <image :src="ImgPaySuccessColor" mode="widthFix" />
    <view class="desc">付款成功</view>
    <view class="btns">
      <view class="btn" @tap="jump('order')">查看订单</view>
      <view class="btn" @tap="jump('index')">返回首页</view>
    </view>
    <PopupLogin />
  </view>
</template>

<script setup>
import { ImgPaySuccessColor } from "../../../utils/iconMap";
import { jumpPage } from "../../../utils/route/route";
const jump = (type) => {
  switch (type) {
    case "order":
      jumpPage({
        to: `/package-service/pages/order/order`,
        mode: "reLaunch",
      });
      break;
    case "index":
      uni.switchTab({
        url: "/pages/index/index",
      });
      break;
    default:
      break;
  }
};
</script>

<style lang="scss" scoped>
.page {
  background: #ffffff;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  image {
    width: 40vw;
    height: 40vw;
    margin-top: 20vh;
  }
  .desc {
    margin-top: 40rpx;
    text-align: center;
    font-size: 34rpx;
  }
  .btns {
    margin-top: 8vh;
    width: 100%;
    padding: 0 30rpx;
    display: flex;
    justify-content: space-between;
    align-items: center;
    .btn {
      width: 47%;
      padding: 30rpx;
      border-radius: 100rpx;
      text-align: center;
      font-size: 34rpx;
      background: $main-color;
      color: #ffffff;
    }
  }
}
</style>
